<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>新闻公告</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="format-detection" content="telephone=no" />
	<link rel="stylesheet" href="../../css/public-heder-Reset.css">
	<link rel="stylesheet" href="../../css/M-News-Notice.css">
</head>
<body>
	<!-- page_box -->
	<div class="page-box">
		<!-- header -->
		<header class="page-header">
			<a href="javascript:history.go(-1)" class="back"></a>
			<p class="pege-name">新闻公告</p>
		</header>
		<div class="liubai"></div>
		<!-- header /-->
		<!-- introduce -->
		<div class="introduce">
			<ul class="btn">
				<li class="Journalism active">新闻</li>
				<li class="News ">公告</li>
			</ul>
		</div>
		<!-- introduce/ -->
		<!-- more-list -->
		<div class="more-list">
			<ul></ul>
			
		</div>
		<!-- more-list/ -->
	</div>
<script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/http-url.js"></script>
<script type="text/javascript" src="../../js/dropload.js"></script>
<script type="text/javascript">
$(function(){
	var dataClick=null;
	var load_me;
	loadProject(0,0)
	$('.introduce .btn').find('li').click(function(){
		if(dataClick){
			return;
		}
		if(load_me){
			$(".dropload-down").remove();
			// 锁定
            load_me.lock();
              // 无数据
              load_me.noData();
		}
		var index=$(this).index();
		$('.more-list ul').html('');
		$('.introduce .btn').find('li').removeClass('active');
		$(this).addClass('active');
		loadProject(index,0)
	});
	function loadProject(projectName,projectsNuber){
	    // dropload
	    $('.page-box').dropload({
	        scrollArea : window,
	        loadDownFn : function(me){
	        	dataClick=true;
	        	load_me=me;
	          ajaxRequest('/api/articles/'+projectName+'/'+projectsNuber+'',true,function(data){
	            // 判断是否加载完毕
	            if(!data.data.articles){
	               // 锁定
	                me.lock();
	              // 无数据
	              me.noData();
	            }
	           	 	$(data.data.articles).appendTo('.more-list ul');
	           	 	projectsNuber++;
	           	    me.resetload();
	           	    dataClick=null;
	          	},false);  
	        },
	        threshold :50
	    });	
	}
	
});

	</script>
</body>
</html>